home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Lib / table / tb_nm2struct.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  694 b   |  37 lines

  1. /* tb_nm2struct: convert a table name to a struct pointer */
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Lib/table/RCS/tb_nm2struct.c,v 6.0 1991/12/18 20:24:28 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Lib/table/RCS/tb_nm2struct.c,v 6.0 1991/12/18 20:24:28 jpo Rel $
  9.  *
  10.  * $Log: tb_nm2struct.c,v $
  11.  * Revision 6.0  1991/12/18  20:24:28  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15.  
  16.  
  17.  
  18. #include "util.h"
  19. #include "table.h"
  20.  
  21.  
  22. Table   *
  23. tb_nm2struct(name)
  24. char    *name;
  25. {
  26.     register Table  **tbl;
  27.  
  28.     if (tb_all == (Table **)0)
  29.         return( (Table *)0);
  30.  
  31.     for(tbl = tb_all ; *tbl != (Table *)0 ; tbl++)
  32.         if(lexequ(name, (*tbl)->tb_name) == 0)
  33.             return(*tbl);
  34.  
  35.     return( (Table *)0);
  36. }
  37.